<!--{template common/header}-->
<!--{template focus/header}-->
<!--{if $_G[gp_task]=='engine'}-->
<form action="index.php" name="adminform" method='post'>
	<input type="hidden" name="option" value="focus">
	<input type="hidden" name="task" value="engine">
    <input type="hidden" name="formhash" value="{FORMHASH}" />
	<table class="datalist">
		<tr>
			<td>&nbsp;</td>
			<td align=center>URL</td>
			<td align=center>{lang Charset}</td>
			<td align=center>{lang Content Format}</td>
			<td align=center>{lang Action}</td>
		</tr>
<!--{loop $listarr $v}-->
		<tr align="center">
			<td><input class="checkbox" type="checkbox" name="ids[]" value="$v[id]"></td>
			<td align='left'>$v[url]</td>
			<td nowrap>$v[charset]</td>
			<td nowrap>$v[format]</td>
			<td nowrap>
				<a href="index.php?option=focus&task=modifyengine&id=$v[id]">{lang Setting}</a>|
				<a href="index.php?option=focus&task=testengine&id=$v[id]" title="读取新内容">{lang Test}</a>|
				<A onclick="return confirm('确定要删除么？');" href="index.php?option=focus&task=delengine&id=$v[id]">{lang Del}</A>
			</td>
		</tr>
<!--{/loop}-->
		<tr>
			<td colspan='2' nowrap>
				<input class="checkbox" type="checkbox" name="chkall" class="header" onclick="checkall(this.form,'ids')" title="{lang Select All}">{lang Select All}&nbsp;
				</td>
			<td colspan="4">
{$multipage}
			</td>
		</tr>
	</table>
	<br style="clear:both">
		<input type="submit" name="savesubmit" value="{lang Submit}" class="btn" onclick="return confirm('{lang Are you sure you are want to delete these?}')">
		<input type="submit" name="addnew" value="{lang Add}" class="btn" onclick="document.adminform.task.value='modifyengine';document.adminform.formhash.value='';return true;">
</form>
<!--{elseif $_G[gp_task]=='modifyengine'}-->
<form method="post" name="thevalueform" id="theform" action="index.php?option=focus&task=modifyengine" enctype="multipart/form-data"> 
	<input type="hidden" name="formhash" value="{FORMHASH}"> 
	<table cellspacing="0" cellpadding="0" width="100%"  class="datalist"> 
		<tr id="tr_url"> 
			<th>网址</th> 
			<td colspan="2">
				<input name="url" type="text" id="url" size="30" value="{$row[url]}" style='width:98%;' />
			</td> 
		</tr> 
		<tr id="tr_charset"> 
			<th>编码</th> 
			<td colspan="2">
				<select name="charset" id="charset"> 
					<option value="auto"{if $row[charset]=='auto'} selected{/if}>自动侦测</option> 
					<option value="gb2312"{if $row[charset]=='gb2312'} selected{/if}>gb2312</option> 
					<option value="utf-8"{if $row[charset]=='utf-8'} selected{/if}>utf-8</option> 
					<option value="big5"{if $row[charset]=='big5'} selected{/if}>big5</option> 
				</select> 
			</td> 
		</tr> 
		<tr id="tr_format"> 
			<th>内容格式</th> 
			<td colspan="2">
				<select name="format" id="format"> 
					<option value="rss"{if $row['format']=='rss'} selected{/if}>rss</option> 
					<option value="http"{if $row['format']!='rss'} selected{/if}>http</option> 
				</select> 
			</td> 
		</tr> 
		<tr id="tr_replace"> 
			<th><b>内容替换规则</b><br>主要是为了想简单一下采集列表时的规则，所以，在这里把一些不必要的内容先行过滤掉。<br>替换前与替换后用&lt;==&gt;隔开，两条规则之间用&lt;==newline==&gt;隔开，独占一行。</th> 
			<td colspan="2"><textarea name="replace" style="width:98%;" rows="5">{$row['replace']}</textarea></td> 
		</tr> 
		<tr id="tr_rule"> 
			<th><b>规则</b><br>如果内容格式为http，请在这里填写上内容的截取规则，将简介部分用\{intro\}代替，链接部分用\{url\}代替，其它未知的字符（如空格、TAB、回车等用{ignore}代替。</th> 
			<td colspan="2">
				<textarea name="rule" style="width:98%;" rows="5">{$row['rule']}</textarea>
			</td> 
		</tr> 
		<tr id="tr_titlehl"> 
			<th><b>标题高亮规则</b></th> 
			<td colspan="2"><textarea name="titlehl" style="width:98%;" rows="1">{$row['titlehl']}</textarea></td> 
		</tr> 
		<tr id="tr_contenthl"> 
			<th><b>正文高亮规则</b></th> 
			<td colspan="2"><textarea name="contenthl" style="width:98%;" rows="1">{$row['contenthl']}</textarea></td> 
		</tr>
		<tr id="tr_contenthl"> 
			<th><b>是否全文</b></th> 
			<td>
				<input class="checkbox" name='fullcontent' type='radio' value='0' id='full_0' {if $row[fullcontent]==0} checked {/if}><label for='full_0'>否</label>
				<input class="checkbox" name='fullcontent' type='radio' value='1' id='full_1' {if $row[fullcontent]==1} checked {/if}><label for='full_0'>是</label>
			</td> 
		</tr>
	</table>
	<input type="hidden" name="id" value="{$row[id]}">
	<input type="submit" name="savesubmit" value="{lang Submit}" class="btn"> 
	<input type="reset" name="importreset" value="{lang Reset}" class="btn">
</form> 
<!--{/if}-->
<!--{template focus/footer}-->
<!--{template common/footer}-->
